$curTheme: 'dark';

$themes: (
  dark: (
    bgColor: #000,
    textColor: #fff,
    borderColor: red
  ),
  light: (
    bgColor: #fff,
    textColor: #000,
    borderColor: black
  ),
);

@mixin useTheme {
  @each $key, $value in $themes {
    $curTheme: $key !global;
    html[data-theme='#{$key}'] & {
      @content;
    }
  }
}

@function getVal($paramsName) {
  $themeMap: map-get($themes, $curTheme);
  @return map-get($themeMap, $paramsName);
}